<?php
include_once(dirname(__FILE__) . "/service-adapter-base.php");

class RelatedRecommAdapter extends ServiceAdapterBase {
  function __construct() {
    parent::__construct('127.0.0.1', '9091');
    $this->service_ = new RelatedRecommClient($this->protocol_);
  }

  protected function LoadIDL() {
    require_once './gen-php/ServiceBase/ServiceBase.php';
    require_once './gen-php/ServiceBase/ServiceBase_types.php';
    require_once './gen-php/RelatedRecomm/RelatedRecomm.php';
    require_once './gen-php/RelatedRecomm/RelatedRecomm_types.php';
  }

  function GetRelated($article_id) {
    //try {
      return $this->service_->GetRelated($article_id);
    //} catch (TException $tx) {
    //  echo $tx;
    //}
    return array();
  }
}
?>
